#ifndef _SimpleStats_h_
#define _SimpleStats_h_
#include "sthread.h"

typedef struct SimpleStatsS{
  smutex_t mutex;
  int n;
  int verbose;
  int *eatCount;
  int *eatingNow;
  int curSimul;
  int maxSimul;
  int totalFill;
  int totalEat;
  time_t lastCheck;
  int lastCheckEatTotal;
  int infiniteBowl;
  int fillingBowl;
  int cleaningSticks;
  int cleaningPlates;
  int cleaningBowl;
  int cleaningCount;
} SimpleStats;

void SS_init(SimpleStats *s, int n, int verbose, int infiniteBowl);
void SS_eatingStart(SimpleStats *s, int id);
void SS_eatingDone(SimpleStats *s, int id);
void SS_fillingStart(SimpleStats *s);
void SS_fillingDone(SimpleStats *s, int amount);
void SS_cleaningStart(SimpleStats *s);
void SS_cleaningDoneBowl(SimpleStats *s);
void SS_cleaningDone(SimpleStats *s);
void SS_progress(SimpleStats *s);
void SS_printStats(SimpleStats *s);
#endif 
